package com.ac.api.alarm_record.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ac.api.alarm_record.entity.AlarmRecord;
import com.ac.api.alarm_record.dao.AlarmRecordMapper;
import com.ac.api.alarm_record.service.AlarmRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 设备报警记录表 服务实现类
 * </p>
 *
 * @author dc
 * @since 2025-06-11
 */
@Service
public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, AlarmRecord> implements AlarmRecordService {

    @Override
    public List<AlarmRecord> list(AlarmRecord example) {
        return this.list(buildWrapper(example));
    }

    @Override
    public IPage<AlarmRecord> page(AlarmRecord example, IPage page) {
        return this.page(page,buildWrapper(example));
    }

    /**
     * 构建查询
     *
     * @param example
     * @return
     */
    private QueryWrapper<AlarmRecord> buildWrapper(AlarmRecord example) {
        QueryWrapper<AlarmRecord> wrapper     = new QueryWrapper<>();
        return wrapper;
    }

}
